import request from '@/utils/request';

export async function queryCurrent() {
  return request('/api/currentUser');
}

export async function queryProvince() {
  return request('/api/geographic/province');
}

export async function queryCity(province: string) {
  return request(`/api/geographic/city/${province}`);
}

export async function query() {
  return request('/api/users');
}

// 用户密码重置
export async function updateUserPwd(oldPassword: string, newPassword: string) {
  const params = {
    oldPassword,
    newPassword,
  };
  return request('/system/user/profile/updatePwd', {
    method: 'PUT',
    params,
  });
}
